import request from '@/utils/request'

//常量
const api_name = '/admin/system/sysUser'

export default {
    //列表
    getPageList(page,limit,searchObj) {
        return request({
            url: `/admin/user/findPage/${page}/${limit}`,
            method: 'post',
            data: searchObj
        })
    },
    //添加
    save(user) {
        return request({
            url: `/admin/user/addUser`,
            method: 'post',
            data: sysUser
        })
    },
    //根据id查询
    getUserId(id) {
        return request({
            url: `/admin/user/getUserById/${id}`,
            method: 'get'
        })
    },
    //修改
    update(user) {
        return request({
            url: `/admin/user/updateById`,
            method: 'post',
            data: user
        })
    },
    //删除
    removeById(id) {
        return request({
            url: `/admin/user/deleteById/${id}`,
            method: 'delete'
        })
    },
    //更改用户状态
    updateStatus(id,status) {
        return request({
            url: `/admin/user/updateStatus/${id}/${status}`,
            method: 'post'
        })
    },
}